package com.log.controller;

import com.log.common.vo.ResultVo;
import com.log.service.LoginService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 林永智
 * @Date: 2023/10/19/23:01
 */
@RestController
@RequestMapping("/user")
@Api(tags = "登录注册")
public class LoginController {
    @Autowired
    private LoginService loginService;

    @ApiOperation("登录")
    @GetMapping("/login")
    public ResultVo login(String username,String password)
    {
        return loginService.loginByTel(username,password);
    }

//    @ApiOperation("注册")
//    @PostMapping("/register")
//    public ResultVo register(String phone,String pwd)
//    {
//        return loginService.register(phone,pwd);
//    }

}
